{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\lps29\Dropbox\Party_Interactions_Perceptions\PSRM Submission\Replication Files\fig 1.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}10 Apr 2023, 08:16:22

{com}. do "C:\Users\lps29\AppData\Local\Temp\STD04000000.tmp"
{txt}
{com}. /* This do file provides the code to generate Figure 1 in the main text*/
. 
. global dataDir "~/Dropbox/Party_Interactions_Perceptions/PSRM Submission/Replication Files"
{txt}
{com}. use "$dataDir/replication_data.dta", clear
{txt}
{com}. 
. 
. 
. set more off
{txt}
{com}. foreach i of numlist 1 2{c -(}
{txt}  2{com}. 
. replace dyad_name`i'="AfD" if dyad_name`i'=="afd"
{txt}  3{com}. replace dyad_name`i'="Alt" if dyad_name`i'=="alt"
{txt}  4{com}. replace dyad_name`i'="BQ" if dyad_name`i'=="bq"
{txt}  5{com}. replace dyad_name`i'="CDU" if dyad_name`i'=="cdu"
{txt}  6{com}. replace dyad_name`i'="Cons" if dyad_name`i'=="cons"
{txt}  7{com}. replace dyad_name`i'="KF" if dyad_name`i'=="cpp"
{txt}  8{com}. replace dyad_name`i'="DF" if dyad_name`i'=="dpp"
{txt}  9{com}. replace dyad_name`i'="Enh" if dyad_name`i'=="enh"
{txt} 10{com}. replace dyad_name`i'="FDP" if dyad_name`i'=="fdp"
{txt} 11{com}. replace dyad_name`i'="Lab" if dyad_name`i'=="lab"
{txt} 12{com}. replace dyad_name`i'="Lib" if dyad_name`i'=="lib"
{txt} 13{com}. replace dyad_name`i'="LibDem" if dyad_name`i'=="libdem"
{txt} 14{com}. replace dyad_name`i'="Linke" if dyad_name`i'=="linke"
{txt} 15{com}. replace dyad_name`i'="NDP" if dyad_name`i'=="ndp"
{txt} 16{com}. replace dyad_name`i'="NB" if dyad_name`i'=="new"
{txt} 17{com}. replace dyad_name`i'="RadVen" if dyad_name`i'=="rad"
{txt} 18{com}. replace dyad_name`i'="SDP" if dyad_name`i'=="sdp"
{txt} 19{com}. replace dyad_name`i'="SNP" if dyad_name`i'=="snp"
{txt} 20{com}. replace dyad_name`i'="SPD" if dyad_name`i'=="spd"
{txt} 21{com}. replace dyad_name`i'="SF" if dyad_name`i'=="spp"
{txt} 22{com}. replace dyad_name`i'="UKIP" if dyad_name`i'=="ukip"
{txt} 23{com}. replace dyad_name`i'="Ven" if dyad_name`i'=="ven"
{txt} 24{com}. replace dyad_name`i'="Green" if dyad_name`i'=="green"
{txt} 25{com}. 
. 
. {c )-}
{txt}(6,128 real changes made)
(2,556 real changes made)
(2,352 real changes made)
(15,320 real changes made)
(17,643 real changes made)
(3,834 real changes made)
(8,946 real changes made)
(5,112 real changes made)
(9,192 real changes made)
(9,592 real changes made)
(4,704 real changes made)
(4,388 real changes made)
(3,064 real changes made)
(9,408 real changes made)
(1,278 real changes made)
(7,668 real changes made)
(11,502 real changes made)
(1,990 real changes made)
(12,256 real changes made)
(6,390 real changes made)
(995 real changes made)
(10,224 real changes made)
(0 real changes made)
(9,192 real changes made)
(8,946 real changes made)
(7,056 real changes made)
(0 real changes made)
(2,352 real changes made)
(7,668 real changes made)
(2,556 real changes made)
(6,390 real changes made)
(6,128 real changes made)
(2,398 real changes made)
(16,206 real changes made)
(4,796 real changes made)
(12,256 real changes made)
(0 real changes made)
(10,224 real changes made)
(3,834 real changes made)
(0 real changes made)
(7,194 real changes made)
(3,064 real changes made)
(5,112 real changes made)
(6,786 real changes made)
(1,278 real changes made)
(31,106 real changes made)

{com}. 
. capture drop dyadname
{txt}
{com}. egen dyadname=concat(dyad_name1 dyad_name2), punct("-")
{txt}
{com}. 
. 
. capture drop countryyear
{txt}
{com}. egen countryyear=concat(country year)
{txt}
{com}. 
. 
. 
. /* Germany 2019*/
. 
. 
. set more off
{txt}
{com}. 
. local figure=1
{txt}
{com}. levelsof dyadname if countryyear=="Germany2019" & coop!=., local(levels) 
{txt}`"AfD-Green"' `"AfD-Linke"' `"CDU-AfD"' `"CDU-FDP"' `"CDU-Green"' `"CDU-Linke"' `"CDU-SPD"' `"FDP-AfD"' `"FDP-Green"' `"FDP-Linke"' `"Linke-Green"' `"SPD-AfD"' `"SPD-FDP"' `"SPD-Green"' `"SPD-Linke"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  
. sum coop if dyadname=="`l'" & countryyear=="Germany2019" & coop!=.
{txt}  3{com}. 
. local ll2 : di %3.2f r(mean)
{txt}  4{com}. 
.  
. twoway histogram coop if dyadname=="`l'" & countryyear=="Germany2019" ///
>  & coop!=., ///
>  discrete percent xtitle("") ytitle("") color(gray) xline(`ll2') ///
>  text(55 `ll2' "`ll2'") title("`l'") graphregion(margin(0 0 0 0)) plotregion(margin(0 0 0 0)) ///
>  name(`ctryyear'fig`figure', replace) yscale(r(0 30)) nodraw
{txt}  5{com}.  
.  local figure=`figure'+1
{txt}  6{com}.  
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.254671    2.014964          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.294002    2.152433          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.873156    2.372463          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    5.603736    2.284255          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.858407     2.24696          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    2.842675    2.361275          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    6.577188     2.23743          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    2.022616    2.378231          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    3.884956    2.260918          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    3.010816    2.453681          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.833825    2.510003          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.434612    2.040896          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.250737    2.121103          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    5.852507    2.165376          0         10

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.864307    2.339172          0         10
{txt}
{com}.  
.  
.  set more off
{txt}
{com}.  capture drop partiesname
{txt}
{com}.  gen partiesname=""
{txt}(154,542 missing values generated)

{com}.  
.   capture drop avg
{txt}
{com}.  gen avg=.
{txt}(154,542 missing values generated)

{com}.  
.  local row=1
{txt}
{com}.  levelsof dyadname if countryyear=="Germany2019", local(levels) 
{txt}`"AfD-Green"' `"AfD-Linke"' `"CDU-AfD"' `"CDU-FDP"' `"CDU-Green"' `"CDU-Linke"' `"CDU-SPD"' `"FDP-AfD"' `"FDP-Green"' `"FDP-Linke"' `"Linke-Green"' `"SPD-AfD"' `"SPD-FDP"' `"SPD-Green"' `"SPD-Linke"'

{com}.  foreach l of local levels {c -(}
{txt}  2{com}.  sum coop if dyadname=="`l'" & countryyear=="Germany2019" & coop!=.
{txt}  3{com}. replace avg=r(mean) in `row'
{txt}  4{com}.   replace partiesname="`l'" in `row'
{txt}  5{com}.   local row=`row'+1
{txt}  6{com}. 
.  {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.254671    2.014964          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str1{sf}{txt} now {bf}{res}str9{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.294002    2.152433          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.873156    2.372463          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    5.603736    2.284255          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.858407     2.24696          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    2.842675    2.361275          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    6.577188     2.23743          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    2.022616    2.378231          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    3.884956    2.260918          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    3.010816    2.453681          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.833825    2.510003          0         10
{txt}(1 real change made)
variable {bf}partiesname{sf} was {bf}{res}str9{sf}{txt} now {bf}{res}str11{sf}
{txt}(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    1.434612    2.040896          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.250737    2.121103          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    5.852507    2.165376          0         10
{txt}(1 real change made)
(1 real change made)

    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}coop {c |}{res}      1,017    4.864307    2.339172          0         10
{txt}(1 real change made)
(1 real change made)

{com}.  capture drop groupid
{txt}
{com}.  egen groupid=group(partiesname)
{txt}(154527 missing values generated)

{com}.  
. 
.  
. graph combine fig7 fig14 fig4 fig15 fig5 fig11 fig13 fig9 fig10 ///
> fig6 fig8 fig3 fig12 fig2 fig1 , ///
>  l1(% of Respondents) b1(Perceived Cooperation Scores) rows(3) ///
>  note("Dashed line indicates the average cooperation score",size(vsmall)) ///
>  ycommon scale(1.15) title()  
{res}{txt}
{com}.  
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\lps29\Dropbox\Party_Interactions_Perceptions\PSRM Submission\Replication Files\fig 1.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}10 Apr 2023, 08:17:39
{txt}{.-}
{smcl}
{txt}{sf}{ul off}